﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void кнопка_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Привет!");

        }

        private void кнопка_MouseMove(object sender, MouseEventArgs e)
        {
            кнопка.Top = кнопка.Top - e.Y;
            кнопка.Top = кнопка.Top - e.X;
            if (кнопка.Top < -20 || кнопка.Top > 100)
                кнопка.Top + 100;
            if (кнопка.Left<-890)
        }
    }
}
